#include <bottombar.h>

#include <QObject>

BottomBar::BottomBar(QWidget *parent) : QWidget(parent)
{
	ui.setupUi(this);
	QObject::connect(ui.config_button, SIGNAL(clicked()), this, SLOT(clicaram_config()) );
	QObject::connect(ui.hist_button, SIGNAL(clicked()), this, SLOT(clicaram_hist()) );
	QObject::connect(ui.new_tab_button, SIGNAL(clicked()), this, SLOT(clicaram_criaba()) );
	QObject::connect(ui.close_tab_button, SIGNAL(clicked()), this, SLOT(clicaram_mataba()) );
    QObject::connect(ui.show_tabs_button, SIGNAL(clicked()), this, SLOT(clicaram_mostra_abas()) );
}

/** Muda a mensagem de status */
void BottomBar::setStatusMessage(const QString & text)
{
    Q_UNUSED(text);
	ui.status_message->setText(text);
}

void BottomBar::clicaram_config()
{
	emit showConf();
}

void BottomBar::clicaram_criaba()
{
	emit newTab();
}

void BottomBar::clicaram_mataba()
{
	emit closeTab();
}

void BottomBar::clicaram_hist()
{
	emit showHistory();
}

void BottomBar::clicaram_mostra_abas()
{
    emit showPages();
}